#include "mainwindow.h"
#include "ui_mainwindow.h"

MainWindow::MainWindow(QWidget *parent) :
    QMainWindow(parent),
    ui(new Ui::MainWindow)
{
    ui->setupUi(this);
}

MainWindow::~MainWindow()
{
    delete ui;
}

void MainWindow::on_pushButton_clicked()
{
    //create watchDog
    watchDog= new SafeWatchDog(5000,100,this,1);
}

void MainWindow::on_pushButton_2_clicked()
{
    // start watchDog
    watchDog->startDog();
}

void MainWindow::on_pushButton_3_clicked()
{
    watchDog->feedDog();
}

void MainWindow::on_pushButton_4_clicked()
{
    watchDog->killThread();
}

void MainWindow::watchDogFailedProcess()
{
   qDebug()<<"MainWindow::watchDogFailedProcess()";
}
